<html>
<head><meta charset="utf-8"><title>Annotate functions like clang · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Annotate.20functions.20like.20clang.html">Annotate functions like clang</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="240709797"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Annotate%20functions%20like%20clang/near/240709797" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> not-matthias <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Annotate.20functions.20like.20clang.html#240709797">(May 29 2021 at 16:28)</a>:</h4>
<p>I'm currently building my own obfuscator using llvm passes and I was wondering if I could add annotations to functions like clang. LLVM-Obfuscator uses this (<a href="https://github.com/obfuscator-llvm/obfuscator/wiki/Functions-annotations">Source</a>):</p>
<div class="codehilite"><pre><span></span><code>int foo() __attribute((__annotate__((&quot;fla&quot;))));
int foo() {
   return 2;
}
</code></pre></div>
<p>Haven't found anything on how to do this with Rust. Even if it's not possible, what would you consider the closest thing that could be used for that too? Thanks in advance.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>